home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Updates, etc. / PG PRO⁄PG Lite Demos / PG Writer π / PG PRO.GLBL < prev    next >
Text File  |  1994-03-28  |  7KB  |  142 lines

  1. '===============================================================================
  2. '= Copyright 1992 Staz™ Software, Inc.   =  Portions © 1992 Zedcor™, Inc.      =
  3. '=       All rights reserved             =        All rights reserved          =
  4. '=         "PG PRO.GLBL"                 =   from "Runtime.GLBL"  by Andy G.   =
  5. '===============================================================================
  6. '_______________________________________________________________________________
  7. '››››››››››››››››››››››››››››››››››› EQUATES ›››››››››››››››››››››››››››››››››››
  8. '———————————————————————————————————————————————————————————————————————————————
  9. '-------------------------------------------------------------------------------
  10. :'PG:PRO CONSTANTS
  11. '-------------------------------------------------------------------------------
  12. _baseID                 = 4000'starting ID for resources
  13. _tempID                 = 3500'ID for temporary resources
  14.  
  15. _typeFSS                = _"fss "
  16. _keyDirectObject        = _"----"
  17. _typeAEList             = _"list"
  18. _typeAppleEvent         = _"aevt"
  19. _kAEOpenApplication     = _"oapp"
  20. _kAEOpenDocuments       = _"odoc"
  21. _kAEPrintDocuments      = _"pdoc"
  22. _kAEQuitApplication     = _"quit"
  23. '-------------------------------------------------------------------------------
  24. :'PG:PRO MENUS
  25. '-------------------------------------------------------------------------------
  26. _justifyItem            = 12
  27. '-------------------------------------------------------------------------------
  28. :'PG:PRO USER DEFINED CONSTANTS
  29. '-------------------------------------------------------------------------------
  30. _pictCursor             = _arrowCursor'cursor used over pict fields
  31. _fingerCursor           = 4000'hand w/pointer finger
  32. _buttonCursor           = _fingerCursor'cursor used over buttons
  33. _ignoreSnglClk          = _false'report single clicks in lists
  34. _ignoreCmndPeriod       = _false'if true, don't break on "."
  35. _TEWndInset             = 4'pixel inset for text editors
  36. _closeItemSkipsDoids    = _false'Cmnd-W closes doc - not doid?
  37. '_______________________________________________________________________________
  38. '››››››››››››››››››››››››››››››››››› GLOBALS ›››››››››››››››››››››››››››››››››››
  39. '———————————————————————————————————————————————————————————————————————————————
  40. '-------------------------------------------------------------------------------
  41. :'RUNTIME
  42. '-------------------------------------------------------------------------------
  43. DIM gAction%'Event Action
  44. DIM gSubAction%'Sub Action Number
  45. DIM gWhichDialog%'result of DIALOG(0)
  46. DIM gDialogValue%'result of DIALOG(Act)
  47. DIM gWhichClass%'Current Window Class
  48. DIM gActWindow%;0,gActiveWnd'Current Active window number
  49. DIM gOutWindow%;0,gOutputWnd'Current Output window number
  50.  
  51. DIM gMessage1%;0,gWhichMenu%;0,gWhichButton%;0,gIsStationery;0
  52. DIM gWhichField%;0,gWhichRefCon&;0,gMouseY%
  53.  
  54. DIM gMessage2%;0,gWhichItem%;0,gButtonValue%;0,gMouseX%
  55.  
  56. DIM gEventPtr&'Pointer to Event Record
  57. DIM gEventRec;0,gWhat%,gMessage&,gWhen&,gWhereY%,gWhereX%,gModifiers%
  58.  
  59. DIM gClickStatus;0,gFieldWas;0,gOpenVol;0,gFileVol
  60. DIM gControlHndl&;0,gFileType&
  61. DIM gWhichObjElem%
  62.  
  63. DIM gItemName$;0,gControlTitle$;0,gWindowTitle$
  64. DIM 32 gFileName$;0,32 gOpenName$,50 gKey$,gOutputWas
  65.  
  66. DIM gScreenDepth%
  67. DIM gScreenRect;0,gScrnT%,gScrnL%,gScrnB%,gScrnR%'Main Monitor Size in Pixels
  68.  
  69. DIM gWhichWindow
  70. '-------------------------------------------------------------------------------
  71. :'OBJECT
  72. '-------------------------------------------------------------------------------
  73. '
  74. '                      User item designations     "*" set by PG PRO
  75. '                                                 "-" standard user entries
  76. '                                                 "+" free for user items
  77. DIM RECORD gObject
  78. DIM gObjSel'* neg if sel'd/not 1 if group
  79. DIM gObjKind'* see object constants above
  80. DIM gObjRef;0,gObjPenSz'* btn,fld ref num pr pensize
  81. DIM gObjSelT,gObjSelL,gObjSelB,gObjSelR'* selection rect
  82. DIM gObjT,gObjL,gObjB,gObjR'* object's rect
  83. DIM gObjZType'* button/field type
  84. DIM gObjUserTp&;0'- user 'TYPE' designator
  85. DIM gObjLFont;0 ,gObjZJust'  LMCD font# or field just
  86. DIM gObjCtrlVal;0,gObjAutoReSz;0,gObjFillPat'  button value or fill pat
  87. DIM gObjUserHndl&;0'- user handle storage
  88. DIM gObjLSize;0 ,gObjMin;0    ,gObjLinePat'  LM size,scrl min,line pat
  89. DIM gObjMax;0   ,gObjFRed'  scroll btn max,fore red
  90. DIM gObjUser1;0 ,gObjPgUpDn;0 ,gObjFGreen'+ scroll page,fore green
  91. DIM gObjUser2;0 ,gObjCon;0    ,gObjFBlue'+ foreground blue
  92. DIM gObjUser3;0 ,gObjElement;0,gObjResID;0,gObjBRed'+ STR# element,ResID,back red
  93. DIM gObjUser4&;0,gObjHndl&;0  ,gObjBGreen'objHndl,back green
  94. DIM gObjBlue'  background blue
  95. DIM END RECORD _objRecSz
  96. '-------------------------------------------------------------------------------
  97. :'MISC
  98. '-------------------------------------------------------------------------------
  99. DIM gResRef'res file ref num:FN replaceRes
  100. DIM gInBackground'true if switched out by MF
  101. '
  102. DIM gUndoable,gUndoHndl&'(Ed Fltr) globals for undo
  103. DIM gUndoStart,gUndoEnd'(Ed Fltr) sel range for undo
  104. '
  105. DIM gFileList&'handle to file list
  106. DIM 16 gOpenType$'types of fields that may be opened
  107. DIM gDirty'set if file needs to be saved
  108. DIM gKissOfDeath'if non-zero then exit
  109. DIM 32 gSaveName$'name of active document
  110. DIM gSaveVol'vol ref of active doc
  111. DIM gDblWnd'wnd # of dbl-clk'd list
  112. DIM gDblRef'btn # of dbl-clk'd list
  113. DIM gDblTime&'tks for dbl-clk'd list
  114. DIM gDblClick'true if list was dbl-clicked
  115. DIM gSilenceAudio'true if sounds disabled
  116. DIM gI3cursor'tracks cursor over 3D btns
  117. DIM gBigT,gBigL,gBigB,gBigR'generic big rectangle
  118. '-------------------------------------------------------------------------------
  119. DIM GLBLask&      ,GLBLautoMenu& ,GLBLbtnAction&
  120. DIM GLBLbuild&    ,GLBLcheckName&,GLBLclose&
  121. DIM GLBLcntrRes&  ,GLBLcountObj& ,GLBLcursor&
  122. DIM GLBLdrwCtrls& ,GLBLfield&    ,GLBLfindMenu&
  123. DIM GLBLfixEditor&,GLBLfixMenus& ,GLBLframeBtn&
  124. DIM GLBLgetGroup& ,GLBLgetIName& ,GLBLgetObj&
  125. DIM GLBLgetRef&   ,GLBLgetText&  ,GLBLgetWnd&
  126. DIM GLBLgetWTitle&,GLBLinitRntm& ,GLBLinsetWnd&
  127. DIM GLBLmouse&    ,GLBLopenDoc&  ,GLBLopenFile&
  128. DIM GLBLptInObj&  ,GLBLputObj&   ,GLBLputWnd&
  129. DIM GLBLrepRes&   ,GLBLrepXRes&  ,GLBLsetGroup&
  130. DIM GLBLsetGrow&  ,GLBLsetZoom&  ,GLBLshowErr&
  131. DIM GLBLtab&      ,GLBLupdate&   ,GLBLuseObjClr&
  132. DIM GLBLsaveAs&   ,GLBLcloseAll& ,GLBLblkNWhite&
  133. DIM GLBLpntDpth&
  134.  
  135. DIM gChkResErr&   ,gDelElement&  ,gInsElement&
  136. DIM gRepElement&  ,gApndElement& ,gSortStrRes&
  137. DIM gViewListItem&,gIndex2res&   ,gRes2Index&
  138. DIM gNewStr&      ,gCountStr&    ,gParseToComma&
  139. DIM gLMCDappend&  ,gLMCDremove&  ,gParseFromComma&
  140. DIM gLMCDfind&
  141.  
  142.